package cn.wolfcode.luowowo.comment.domain;

import cn.wolfcode.luowowo.common.vo.PicVO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Getter
@Setter
@ToString
@Document("scenic_comment")
public class ScenicComment implements Serializable {
    public static final int SCENIC_COMMENT_TYPE_COMMENT = 0; //普通评论
    public static final int SCENIC_COMMENT_TYPE = 1; //评论的评论
    @Id
    private String id;  //id
    private Long scenicId;  //景点id

    private Long userId;    //用户id
    private String username; //用户名

    private int level;
    private String headUrl;   // 用户头像

    private int startNum; //评论星数

    private String pic; //评论的图片

    private int type = SCENIC_COMMENT_TYPE_COMMENT; //评论类别

    private Date createTime; //创建时间
    private String content;  //评论内容

    private int thumbupnum; //点赞数
    private List<Long> thumbuplist = new ArrayList<>();

    private ScenicComment refComment;  //关联的评论

    private List<PicVO> picVO;
}